package com.lry.util.requestcore.domain;

import cn.hutool.core.collection.ConcurrentHashSet;
import java.util.Collection;

/**
 * @author ALI
 * @since 2023/5/10
 */
public class TableCache {

    private static final ConcurrentHashSet<String> CACHE = new ConcurrentHashSet<>();

    public static void add(String tableName) {
        CACHE.add(tableName);
    }

    public static void remove(String tableName) {
        CACHE.remove(tableName);
    }

    public static void addAll(Collection<String> tableNames) {
        CACHE.addAll(tableNames);
    }

    public static boolean exist(String tableName) {
        return CACHE.contains(tableName);
    }
}
